package IO流.字节;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class 换行和续写 {
    public static void main(String[] args) throws IOException {
        //创建对象
        FileOutputStream fos=new FileOutputStream("F\\aaa\\a.txt");

        //开始的句子
        String str="windoes";
        byte[] bytes1 = str.getBytes();
        fos.write(bytes1);

        //换行
        String wrap="\r\n";
        byte[] bytes2 = wrap.getBytes();
        fos.write(bytes2);

        //后面的内容
        String str2="fsandzzj";
        byte[] bytes3 = str2.getBytes();
        fos.write(bytes3);


        //释放资源
        fos.close();
    }
}
